package system

import (
	"context"

	"go_admin/api/system/v1"
	"go_admin/internal/service"
)

func (c *ControllerV1) PostList(ctx context.Context, req *v1.PostListReq) (res *v1.PostListRes, err error) {
	res, err = service.SysPost().List(ctx, req)
	return
}
func (c *ControllerV1) PostAdd(ctx context.Context, req *v1.PostAddReq) (res *v1.PostAddRes, err error) {
	err = service.SysPost().Add(ctx, req)
	return
}
func (c *ControllerV1) PostEdit(ctx context.Context, req *v1.PostEditReq) (res *v1.PostEditRes, err error) {
	err = service.SysPost().Edit(ctx, req)
	return
}
func (c *ControllerV1) PostDelete(ctx context.Context, req *v1.PostDeleteReq) (res *v1.PostDeleteRes, err error) {
	err = service.SysPost().Delete(ctx, req.Ids)
	return
}
